package com.ssy.lingxi.platform.manage.entity.content;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 栏目实体类
 * @author fhj
 * @version 2.0.0
 * @date 2020/9/18
 */
@Data
@Entity
@Table(schema = "public", name = "man_member_column",
        indexes = {@Index(name = "man_member_column_member_id_member_role_id_idx", columnList = "memberId,memberRoleId")})
public class MemberColumn implements Serializable {
    private static final long serialVersionUID = 8655038946590029728L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "member_column_seq")
    @SequenceGenerator(sequenceName = "man_member_column_seq", name = "member_column_seq", allocationSize = 1)
    private Long id;

    /**
     * 会员id
     */
    @Column(columnDefinition = "int8")
    private Long memberId;

    /**
     * 会员角色id
     */
    @Column(columnDefinition = "int8")
    private Long memberRoleId;

    /**
     * 栏目名称
     */
    @Column(columnDefinition = "varchar(20)")
    private String name;

    /**
     * 栏目分类：1.市场行情；2.资讯；
     */
    private Integer type;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 状态 0-无效 1-有效
     */
    private Integer status = 1;

    /**
     * 创建时间
     */
    private Long createTime = System.currentTimeMillis();
}
